﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;
using RESTServicesMov.Dominio;

namespace RESTServicesMov
{
    [ServiceContract]
    public interface IMovimientos
    {
        [OperationContract]
        [WebInvoke(Method = "GET", UriTemplate = "ingresos/{codigo}", ResponseFormat = WebMessageFormat.Json)]
        List<PedidoDetalle> Consultar(string codigo);

        [OperationContract]
        [WebInvoke(Method = "GET", UriTemplate = "PedidosIngreso/{id}", ResponseFormat = WebMessageFormat.Json)]
        Pedido ObtenerPedidoIngreso(string id);

        [OperationContract]
        [WebInvoke(Method = "GET", UriTemplate = "PedidosSalida/{id}", ResponseFormat = WebMessageFormat.Json)]
        Pedido ObtenerPedidoSalida(string id);

        [OperationContract]
        [WebInvoke(Method = "GET", UriTemplate = "PedidoDetalles/{id}", ResponseFormat = WebMessageFormat.Json)]
        List<PedidoDetalle> ObtenerDetalle(string id);


        [OperationContract]
        [WebInvoke(Method = "POST", UriTemplate = "Salidas", ResponseFormat = WebMessageFormat.Json)]
        Movimiento RegistrarSalida(Movimiento   movACrear);

        [OperationContract]
        [WebInvoke(Method = "POST", UriTemplate = "SalidaItems", ResponseFormat = WebMessageFormat.Json)]
        MovDetalle RegistrarSalidaItems(MovDetallePOST itemACrear);
        

        [OperationContract]
        [WebInvoke(Method = "POST", UriTemplate = "Ingresos", ResponseFormat = WebMessageFormat.Json)]
        Movimiento RegistrarIngreso(Movimiento movACrear);

        [OperationContract]
        [WebInvoke(Method = "POST", UriTemplate = "IngresoItems", ResponseFormat = WebMessageFormat.Json)]
        MovDetalle RegistrarIngresoItems(MovDetallePOST itemACrear);

        // CentroProd+++
        [OperationContract]
        [WebInvoke(Method = "POST", UriTemplate = "CentroProdCrear/{centro},{producto},{stock},{stockMin},{stockMax}", ResponseFormat = WebMessageFormat.Json)]
        CentroProd CrearCentroProd(string centro, string producto, string stock, string stockMin, string stockMax);

        [OperationContract]
        [WebInvoke(Method = "GET", UriTemplate = "Stocks/{centro},{producto}", ResponseFormat = WebMessageFormat.Json)]
        CentroProd ObtenerCentroProd(string centro, string producto);

        [OperationContract]
        [WebInvoke(Method = "PUT", UriTemplate = "CentroProdModificar", ResponseFormat = WebMessageFormat.Json)]
        CentroProd ModificarCentroProd(CentroProd alumnoAModificar);
         
        [OperationContract]
        [WebInvoke(Method = "GET", UriTemplate = "CentroProdConsulta", ResponseFormat = WebMessageFormat.Json)]
        List<CentroProd> ListarCentroProd();
        //CentroProd------


        }

}
